import { defineStore } from "pinia";
import { messageshenpiApis } from "@/services/xiaoxi"

const useMessageStore = defineStore('xiaoxi', {
    state: () => ({
        userinfo: {
            contractNumber: '',
            contractName: '',
            customerName: '',
            contractAmount: '',
            contractStatus: '',
            contractType: '',
            contractFile: '',
            relatedProduct: '',
            signer: '',
            signDate: '',
            expireDate: '',
            paymentMethod: '',
            advancePayment: '',
        }
    }) as any,

    actions: {
        async usemesage(id: number) {
            let ret = await messageshenpiApis(id)
            console.log(ret)
            if (ret.code === 200) {
                console.log(ret);
            }
            return ret.code
        }
    },
})
export default useMessageStore